package com.masblearn;

import java.io.IOException;
import java.util.Properties;

public class PropertiesManager {
    private final static Properties props = new Properties();

    private PropertiesManager(){

    }


    static {
        try {
            props.load(PropertiesManager.class.getClassLoader().getResourceAsStream("config.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static Object get(String key) {
        if (props == null) {
            return null;
        }
        return props.get(key);
    }

    public static void main(String[] args) {
        System.out.println(PropertiesManager.get("initTankCount"));
    }
}
